<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{$title}</title>
    <meta name="keywords" content={$keywords}>
	<meta name="description" content="{$description}">
    <link rel="stylesheet" href="/public/static/css/bootstrap.min.css">
    <link rel="stylesheet" href="/public/static/css/style.css">
    <link rel="stylesheet" href="/public/static/css/icon.css">
    <link rel="stylesheet" href="/public/static/css/layer.css">
</head>
<body>
<div class="i-nav">
    <div class="left">
        <div id="sidebar" class="item">
            <div class="icon" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-expanded="false">
                <i class="iconfont icon-menu-fill"></i>
            </div>
            <ul class="dropdown-menu" aria-labelledby="dropdownMenuLink">
                <li><a class="dropdown-item" href="/ranking">Ranking</a></li>
                <li><a class="dropdown-item" href="/notify">Notify</a></li>
                <li><span class="dropdown-item" id="clockin">Clock In</span></li>
                <li><a class="dropdown-item" href="/about">About</a></li>
            </ul>
        </div>
        <div class="item">
            <a href="/index">
                <span class="title">{$index}</span>
            </a>
        </div>
        <div class="item">
            <a href="/ranking">
                <span class="title">Ranking</span>
            </a>
        </div>
        <div class="item">
            <a href="/notify">
                <span class="title">Notify</span>
            </a>
        </div>
        <div class="item" id="clockin">
            <span class="title">Clock In</span>
        </div>
        <div class="item">
            <a href="/about">
                <span class="title">About</span>
            </a>
        </div>
    </div>
    <div class="right">
        <div class="item nologin">
            <a href="/user/login">
                <span class="signin">Sign in</span>
            </a>
        </div>
        <div class="item nologin">
            <a href="/user/register">
                <span class="signup">Sign up</span>
            </a>
        </div>
        <div class="item islogin" style="display: none;">
            <div class="img">
                <img src="" alt="avatar"/>
            </div>
            <span id="username"></span>
            <div class="more">
                <div class="item">身份：<span>普通用户</span></div>
                <div class="item" id="door" style="display: none;"></div>
                <div class="item" id="userhome"><a href="#">我的个人主页</a></div>
                <div class="item" id="edit" data-toggle="modal" data-target="#userModal"><a href="#">编辑我的资料</a></div>
                <div class="item" id="logout"><a href="#">登出</a></div>
            </div>
        </div>
    </div>
</div>
<div class="main">
    <div class="modal fade" id="userModal" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">修改信息</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="form" id="editUser">
                    <div class="avatar">
                        <img src="" alt="avatar"/>
                        <i class="iconfont icon-page">
                            <input type="file" name="file" id="uploadImage" onchange="postData()" accept="image/*">
                        </i>
                    </div>
                    <div class="name"></div>
                    <div class="form-group">
                        <input name="username" type="text" placeholder="请输入新用户名">
                        <i class="iconfont icon-user"></i>
                    </div>
                    <div class="form-group" id="email">
                        <input name="email" type="text" placeholder="请输入新邮箱">
                        <i class="iconfont icon-post"></i>
                        <span class="badge badge-warning" id="sendEmail">未验证</span>
                    </div>
                    <div class="form-group">
                        <input name="password" type="password" placeholder="请输入旧密码">
                        <i class="iconfont icon-lock"></i>
                    </div>
                    <div class="form-group">
                        <input name="new_password" type="password" placeholder="请输入新密码">
                        <i class="iconfont icon-lock"></i>
                        <p class="tips" id="mail—tips">您输入的邮箱地址不正确</p>
                    </div>
                    <div class="form-group">
                        <input name="website" type="text" placeholder="请输入网站地址">
                        <i class="iconfont icon-url"></i>
                        <p class="tips" id="url-tips">您输入的网站地址不正确</p>
                    </div>
                    <div class="form-group">
                        <input name="content" type="text" placeholder="请输入个性签名">
                        <i class="iconfont icon-post"></i>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                    <button type="button" id="update" class="btn btn-primary">确认</button>
                </div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="notifyModal" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">公告</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body" id="hintData">
                    <p></p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                </div>
            </div>
        </div>
    </div>
    <div class="loading">
        <div class="spinner-border float-right" role="status">
            <span class="sr-only">Loading...</span>
        </div>
    </div>